//
//  LJFCustomCell.m
//  SevenZhou
//
//  Created by qianfeng on 15/9/15.
//  Copyright (c) 2015年 ljf. All rights reserved.
//

#import "LJFCustomCell.h"
#import "LJFSevenView.h"

@implementation LJFCustomCell

- (void)awakeFromNib
{
    // Initialization code
    
    NSArray *arr = @[@"亚洲",@"欧洲",@"大洋洲",@"非洲",@"北美洲",@"南美洲",@"南极洲"];
    
    _scroll.contentSize = CGSizeMake(490, 0);
    
    for (int i = 0; i <7; i++)
    {
        LJFSevenView *view = [[NSBundle mainBundle] loadNibNamed:@"LJFSevenView" owner:self options:0][0];
        
        view.frame = CGRectMake(i*70, 0, 70 , 70);
        
        view.title.text = [NSString stringWithFormat:@"%@",arr[i]];
        
        view.imageView.image = [UIImage imageNamed:[NSString stringWithFormat:@"worldpart_%d.png",i+1]];
        view.imageView.tag = 130 + i;
        
        UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tap:)];        
        [view.imageView addGestureRecognizer:tap];
        
        [_scroll addSubview:view];
    }
}

- (void)tap:(UITapGestureRecognizer *)tap
{
    
    UIImageView *imageView = (UIImageView *)tap.view;
    
    NSInteger tag = imageView.tag;
    
    [_mydeledate LJFCustomCell:self SearchTypeAreaWithClickTag:tag - 130];
    
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
